<div style="width:390px; padding-bottom:0px;">
<?
$row=10000;
$col=1;
$n=$row*$col;
$cat=(int)killInjection($_REQUEST['cat']);

$total=CountRecord("products","categories_id=".$cat);

$p=(int)$_REQUEST['p'];
$sql = "select * from products where categories_id = ".$cat." order by products_date_added limit ".$n*$p.",".$n;
$result = @mysql_query($sql,$con);?>
      <table border="0" align="center" width="100%" id="table72" cellpadding="0">
        <?
for ($i=0;$i<$total/$col;$i++)
{
?>
        <tr>
          <?
	for($j=0;$j<$col&&$row=mysql_fetch_assoc($result);$j++)
	{
	$pro=GetProductInfo($row['products_id']);
?>

                   
                    <td align="center" valign="top">
          <table width="100%" border="0">
   <tr>
    <td  align="left" valign="top" style="background:url(../images/sp11.png) no-repeat 0px 5px; padding-left:18px; color:#8F6B16;  text-transform:uppercase" ><b><? echo $pro['products_name']; ?> </b></td>
    </tr>
  <tr>
    <td align="left" valign="top" ><? if($pro['products_image']!='') {?>  <a  <? if($pro['products_image_large']!='') {?>href="<? echo $pro['products_image_large']; ?>" <? }else { ?>href="<? echo $pro['products_image']; ?>"<? }?>  onClick="return popup(this, 'dan',<?=$width?>,<?=$height?>)" rel="lightbox"> <img  align="right" vspace="2" hspace="2" src="<? echo $pro['products_image']; ?>" width="120" ></a><? }?><? echo $pro['products_shortdescription']; ?>
    
    
    </td>
  </tr>
</table>
           </td>
           
           
          <?		
	}
	while($j<2*$col)
	{
		echo '<td></td>';
		$j=$j+1;
	}
?>
        </tr>
        <?
}
?>
      </table>
</div>
